﻿using FictionsDownload.DAL;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FictionsDownload.Model
{
    [Table("WebFormat")]
    public class WebFormatModel:BaseModel
    {
        public WebFormatModel():base()
        {
            SortOrder = System.Windows.Forms.SortOrder.Ascending;
        }
        [Display(Name = "网站名称")]
        public string Name { get; set; }
        [Display(Name = "网站主址")]
        public string Url { get; set; }
        [Display(Name = "目录开头")]
        public string HtmlHead { get; set; }
        [Display(Name = "目录结尾")]
        public string HtmlTail { get; set; }
        [Display(Name = "卷名开头")]
        public string VolumeHead { get; set; }
        [Display(Name = "卷名结尾")]
        public string VolumeTail { get; set; }
        [Display(Name = "章节开头")]
        public string TextHead { get; set; }
        [Display(Name = "卷名结尾")]
        public string TextTail { get; set; }
        public System.Windows.Forms.SortOrder SortOrder { get; set; }
        public void Delete(IDAL db)
        {
            db.Delete(this);
        }
    }
}
